  
 

       var swiper = new Swiper('.content>.swiper-container', {
          pagination : '.swiper-pagination',
          paginationClickable :true,
             onInit: function(swiper){        //动画
                swiperAnimate(swiper);
            },onSlideChangeEnd: function(swiper){
                swiperAnimate(swiper);
            },onTransitionEnd: function(swiper){
                $('.navs').eq(swiper.activeIndex)   //跟着下标滑动
                .addClass('active')
                .siblings()
                .removeClass('active');

            }
        });
           //下标
            $('.navs').click(function(){
                $(this).addClass('active')
                .siblings()
                .removeClass('active');
                swiper.slideTo($(this).index(), 1000)
                 // console.log( swiper)
            });

  
  $.ajax({
        type:"GET",
        url:"../json/home page.json",
        async:true,
        success:function(res){
          // console.log(res)
          var str = template('list_caidan',{sectionMain:res});
          $('.sectionMain').html(str);

        }
          });

    $.ajax({
        type:"GET",
        url:"../json/newest3.json",
        async:true,
        success:function(resd){
          // console.log(resd)
          var stra = template('mains_lis',{mains:resd});
          $('.mains').html(stra);

        }
          });
      $.ajax({
        type:"GET",
        url:"../json/HOMEnearby.json",
        async:true,
        success:function(rest){
          // console.log(rest)
          var strb = template('home_lis',{homepagr:rest});
          $('.homepagr').html(strb);

        }
          });
